// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SYS_FILE
// * CreateDate    : 2014-06-05 18:30:43
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:43
// * LastChanger   : 2014-06-05 18:30:43
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SysFileEntity : EntityBase
    {
        public SysFileTable TableSchema
        {
            get
            {
                return SysFileTable.Current;
            }
		}
		
		public SysFileEntity()
        {

        }
		
		public SysFileEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
            this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
            this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
            this.RowId = Convert.ToString(CommonFunctions.ToObject(dr["ROW_ID"]));
            this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
            this.Path = Convert.ToString(CommonFunctions.ToObject(dr["PATH"]));
            this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
            this.DeptNo = Convert.ToString(CommonFunctions.ToObject(dr["DEPT_NO"]));
            this.DocumentNo = Convert.ToString(CommonFunctions.ToObject(dr["DOCUMENT_NO"]));
            this.FileNo = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NO"]));
            this.ActiveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ACTIVE_DATE"]));
            this.InactiveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["INACTIVE_DATE"]));
            this.Ver = Convert.ToString(CommonFunctions.ToObject(dr["VER"]));
            this.ControlType = Convert.ToString(CommonFunctions.ToObject(dr["CONTROL_TYPE"]));
            this.FileExistsType = Convert.ToString(CommonFunctions.ToObject(dr["FILE_EXISTS_TYPE"]));
            this.SaveTimerange = Convert.ToString(CommonFunctions.ToObject(dr["SAVE_TIMERANGE"]));
            this.FilePosition = Convert.ToString(CommonFunctions.ToObject(dr["FILE_POSITION"]));
            this.FileStatus = Convert.ToString(CommonFunctions.ToObject(dr["FILE_STATUS"]));
            this.LogicNo = Convert.ToString(CommonFunctions.ToObject(dr["LOGIC_NO"]));
        }
		
		public SysFileEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
            this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
            this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
            this.RowId = Convert.ToString(CommonFunctions.ToObject(dr["ROW_ID"]));
            this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
            this.Path = Convert.ToString(CommonFunctions.ToObject(dr["PATH"]));
            this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
            this.DeptNo = Convert.ToString(CommonFunctions.ToObject(dr["DEPT_NO"]));
            this.DocumentNo = Convert.ToString(CommonFunctions.ToObject(dr["DOCUMENT_NO"]));
            this.FileNo = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NO"]));
            this.ActiveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ACTIVE_DATE"]));
            this.InactiveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["INACTIVE_DATE"]));
            this.Ver = Convert.ToString(CommonFunctions.ToObject(dr["VER"]));
            this.ControlType = Convert.ToString(CommonFunctions.ToObject(dr["CONTROL_TYPE"]));
            this.FileExistsType = Convert.ToString(CommonFunctions.ToObject(dr["FILE_EXISTS_TYPE"]));
            this.SaveTimerange = Convert.ToString(CommonFunctions.ToObject(dr["SAVE_TIMERANGE"]));
            this.FilePosition = Convert.ToString(CommonFunctions.ToObject(dr["FILE_POSITION"]));
            this.FileStatus = Convert.ToString(CommonFunctions.ToObject(dr["FILE_STATUS"]));
            this.LogicNo = Convert.ToString(CommonFunctions.ToObject(dr["LOGIC_NO"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SysFileTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SysFileTable.C_ID)); }
            set { SetData(SysFileTable.C_ID, value); }
        }

         [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(SysFileTable.C_IS_ACTIVE)); }
            set { SetData(SysFileTable.C_IS_ACTIVE, value); }
        }

         [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SysFileTable.C_CREATED_DATE)); }
            set { SetData(SysFileTable.C_CREATED_DATE, value); }
        }

         [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SysFileTable.C_CREATED_BY)); }
            set { SetData(SysFileTable.C_CREATED_BY, value); }
        }

         [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(SysFileTable.C_UPDATED_DATE)); }
            set { SetData(SysFileTable.C_UPDATED_DATE, value); }
        }

         [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(SysFileTable.C_UPDATED_BY)); }
            set { SetData(SysFileTable.C_UPDATED_BY, value); }
        }

         [DataMember]
        public string FormName
        {
            get { return Convert.ToString(GetData(SysFileTable.C_FORM_NAME)); }
            set { SetData(SysFileTable.C_FORM_NAME, value); }
        }

         [DataMember]
        public string RowId
        {
            get { return Convert.ToString(GetData(SysFileTable.C_ROW_ID)); }
            set { SetData(SysFileTable.C_ROW_ID, value); }
        }

         [DataMember]
        public string Name
        {
            get { return Convert.ToString(GetData(SysFileTable.C_NAME)); }
            set { SetData(SysFileTable.C_NAME, value); }
        }

         [DataMember]
        public string Path
        {
            get { return Convert.ToString(GetData(SysFileTable.C_PATH)); }
            set { SetData(SysFileTable.C_PATH, value); }
        }

         [DataMember]
        public string Type
        {
            get { return Convert.ToString(GetData(SysFileTable.C_TYPE)); }
            set { SetData(SysFileTable.C_TYPE, value); }
        }

         [DataMember]
        public string DeptNo
        {
            get { return Convert.ToString(GetData(SysFileTable.C_DEPT_NO)); }
            set { SetData(SysFileTable.C_DEPT_NO, value); }
        }

         [DataMember]
        public string DocumentNo
        {
            get { return Convert.ToString(GetData(SysFileTable.C_DOCUMENT_NO)); }
            set { SetData(SysFileTable.C_DOCUMENT_NO, value); }
        }

         [DataMember]
        public string FileNo
        {
            get { return Convert.ToString(GetData(SysFileTable.C_FILE_NO)); }
            set { SetData(SysFileTable.C_FILE_NO, value); }
        }

         [DataMember]
        public DateTime ActiveDate
        {
            get { return Convert.ToDateTime(GetData(SysFileTable.C_ACTIVE_DATE)); }
            set { SetData(SysFileTable.C_ACTIVE_DATE, value); }
        }

         [DataMember]
        public DateTime InactiveDate
        {
            get { return Convert.ToDateTime(GetData(SysFileTable.C_INACTIVE_DATE)); }
            set { SetData(SysFileTable.C_INACTIVE_DATE, value); }
        }

         [DataMember]
        public string Ver
        {
            get { return Convert.ToString(GetData(SysFileTable.C_VER)); }
            set { SetData(SysFileTable.C_VER, value); }
        }

         [DataMember]
        public string ControlType
        {
            get { return Convert.ToString(GetData(SysFileTable.C_CONTROL_TYPE)); }
            set { SetData(SysFileTable.C_CONTROL_TYPE, value); }
        }

         [DataMember]
        public string FileExistsType
        {
            get { return Convert.ToString(GetData(SysFileTable.C_FILE_EXISTS_TYPE)); }
            set { SetData(SysFileTable.C_FILE_EXISTS_TYPE, value); }
        }

         [DataMember]
        public string SaveTimerange
        {
            get { return Convert.ToString(GetData(SysFileTable.C_SAVE_TIMERANGE)); }
            set { SetData(SysFileTable.C_SAVE_TIMERANGE, value); }
        }

         [DataMember]
        public string FilePosition
        {
            get { return Convert.ToString(GetData(SysFileTable.C_FILE_POSITION)); }
            set { SetData(SysFileTable.C_FILE_POSITION, value); }
        }

         [DataMember]
        public string FileStatus
        {
            get { return Convert.ToString(GetData(SysFileTable.C_FILE_STATUS)); }
            set { SetData(SysFileTable.C_FILE_STATUS, value); }
        }

         [DataMember]
        public string LogicNo
        {
            get { return Convert.ToString(GetData(SysFileTable.C_LOGIC_NO)); }
            set { SetData(SysFileTable.C_LOGIC_NO, value); }
        }
		#endregion
	}
	
	
}	

